package com.example.demo.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@ResponseBody
@RequestMapping("/properties")
public class PropertiesController {

    @Value("${my.key}")
    private String key;
    @Value("${my.key2}")
    private String key2;

    @RequestMapping("/print")
    public String print(){
        return "key = " + key + " key2 = " + key2;
    }
}
